<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>添加文章</title>
    <hdjs/>
    <bootstrap/>
    <script type="text/javascript">
        $(function(){
            //判断编辑器是否为空
            $('#add-button').click(function() {
                var content = UE.getEditor('hd_content').getContentTxt();
                var content = $.trim(content);
                if(content){
                    return true;
                }
                alert('内容不能为空');
                return false;
               // 
            });
            
        })
    </script>
    <css file="__CONTROL_TPL__/css/css.css"/>
    <style type="text/css">
		.checkbox{
			 margin-left:5px;
			 width:90px;
			 margin-top: 10px;
		}
		textarea{
			width: 300px;
			height: 100px;
		}
    </style>
</head>
<body>
<div class="wrap">
    <div class="title-header">{$jerry.lang.article_add}</div>
    <form action="" method="post" class="form-inline hd-form" id="add-arc" enctype="multipart/form-data">
        <table class="table1">
            <tr>
                <th class="w100">{$jerry.lang.title}</th>
                <td class="w100">
                    <input type="text" name="title" class="w200"/> 
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.author}</th>
                <td>
                    <input type="text" name="author" class="w200" value="Jerry"/>
                </td>
                <td></td>
            </tr>

            <tr>
                <th class="w100">{$jerry.lang.kind_catrgory}</th>
                <td>
                    <select name="category_cid" class="w200">
                    	
                        <foreach from="$cateData" value="$v">
                            <option value="{$v.cid}">{$v._name}</option>
                        </foreach>
                    </select>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.article_summary}</th>
                <td>
                	<ueditor  width='300' height='200' name='digest' style="2"/>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.thumb_pic}</th>
                <td>
					<input type="file" name="thumb" id=""  value="" />
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.atrr}</th>
                <td>
                	<label class="checkbox-inline">
						{$jerry.lang.hot}
						<input type="checkbox" value="{$jerry.lang.hot}" name="attr[]" class="check_input">
					</label>
					<label class="checkbox-inline">
						{$jerry.lang.top}
						<input type="checkbox" value="{$jerry.lang.top}" name="attr[]" class="check_input">
					</label>
					<label class="checkbox-inline">
						{$jerry.lang.recomment}
						<input type="checkbox" value="{$jerry.lang.recomment}" name="attr[]" class="check_input">
					</label>
					<label class="checkbox-inline">
						{$jerry.lang.image-text}
						<input type="checkbox" value="{$jerry.lang.image-text}" name="attr[]" class="check_input">
					</label>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.image-tags}</th>
                <td>
                    <foreach from="$tagData" value="$v">
                        <label class="checkbox-inline">
                	   {$v.tagname}<input type="checkbox" name="tid[]" id="" value="{$v.tid}"/>
                       </label>
                    </foreach>
                </td>
                <td></td>
            </tr>
             <tr>
                <th class="w100">{$jerry.lang.keywords}</th>
                <td>
                    <textarea name="keywords" id="" rows="10"></textarea>
                </td>
                <td></td>
            </tr>
             <tr>
                <th class="w100">{$jerry.lang.describe}</th>
                <td>
                    <textarea name="description" id="" cols="30" rows="10"></textarea>
                </td>
                <td></td>
            </tr>
             <tr>
                <th class="w100">{$jerry.lang.article_content}</th>
                <td>
                    <ueditor  width='650' height='800' name='content'/>

                </td>

                <td><span id="hd_content"></span></td>
            </tr>
            <tr>
                <th class="w100"></th>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <th class="w100"></th>
                <td></td>
                <td></td>
            </tr>
        
        </table>
        <div class="position-bottom">
            <input type="submit" class="hd-success" value="添加" id="add-button"/>
        </div>
    </form>
</div>
</body>
</html>